package com.wxx.service.tool.wechat;


import com.wxx.model.sdk.WeChatModel;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public interface WeChatService {
    /**
     * 统一下单 app
     * 商户系统先调用该接口在微信支付服务后台生成预支付交易单，返回正确的预支付交易会话标识后再在APP里面调起支付。
     * URL地址：https://api.mch.weixin.qq.com/pay/unifiedorder
     * @param weChatModel
     * @param request
     * @return
     * @throws Exception
     */
    Map<String,Object> toAppPay(WeChatModel weChatModel, HttpServletRequest request) throws Exception;

    /**
     * 统一下单 NATIVE-扫码支付
     * @param weChatModel
     * @param request
     * @return
     * @throws Exception
     */
    Map<String,Object> toNativePay(WeChatModel weChatModel, HttpServletRequest request) throws Exception;

    /**
     * 统一下单 JSAPI-扫码支付
     * @param weChatModel
     * @param request
     * @return
     * @throws Exception
     */
    Map<String,Object> toJsapiPay(WeChatModel weChatModel, HttpServletRequest request) throws Exception;
}
